package com.yr.ryjk.festival.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import com.yr.ryjk.festival.entity.Festival;

public interface FestivalMapper {
	 
    int deleteByPrimaryKey(String[] classList);

    int insert(Festival record);
    int insertSelective(Festival record);

    Festival selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Festival record);
    
    int selectCount();
    
    int updateByPrimaryKey(Festival record);
    
    List<Festival> selectOfPage(int i, int pageSize);

	@Select("select * from festival where start_date <= #{0,jdbcType=DATE} and end_date >= #{0,jdbcType=DATE} limit 0,#{1}")
	@ResultMap("BaseResultMap")
	List<Festival> selectFitList(Date date, int count);

	@Delete("delete from festival where find_in_set(id,#{0})")
	void deleteByIds(String ids);

}